|
Printing art Products
|
|
| |
| Working groups |
| Blessed plots and figures |
| Approving new results and publications |
| Approval web pages - new results |
| Approval web pages - new publications |
| Mu2e Acronyn Dictionary |
| Fermilab Meeting Rooms |
| Fermilab Service Desk |
| ReadyTalk : Home |
| ReadyTalk : Help |
| ReadyTalk : Toll Free Numbers |
mu2e -c Print/fcl/dumpDataProducts.fclTo print the mu2e art products in a file, in a briefer form. Note that this supresses low-momentum particles. example output
mu2e -c Print/fcl/print.fclTo print the mu2e art products in a file, in a longer form. Everything possible is printed. example output
mu2e -c Print/fcl/printLong.fcl
These fcl can be modfied to only print certain products, certain instances of products, and to supress low-momentum particles. See the printLong.fcl file to see all options.
The print module can be put in a path with other modules. This is particularly useful to see the KalRep contents, which are not persistent.
Each product has a utility class which can be used anywhere in the code. As an example:
#include "Print/inc/CaloClusterPrinter.hh"
CaloClusterPrinter _ccprinter;
...
auto ih = event.getValidHandle(tag);
_ccprinter.Print(ih);
To print to a separate file
#include "Print/inc/CaloClusterPrinter.hh"
CaloClusterPrinter _ccprinter;
...
ofstream ofs("file.log");
...
auto ih = event.getValidHandle(tag);
if(interesting) _ccprinter.Print(ih,ofs);
There are several interfaces:
void Print(art::Event const& event,
std::ostream& os = std::cout) override;
void Print(const art::Handle& handle,
std::ostream& os = std::cout);
void Print(const art::ValidHandle& handle,
std::ostream& os = std::cout);
void Print(const CaloClusterCollection& coll,
std::ostream& os = std::cout);
void Print(const art::Ptr& ptr,
int ind = -1, std::ostream& os = std::cout);
void Print(const mu2e::CaloCluster& obj,
int ind = -1, std::ostream& os = std::cout);
We plan to make sure all products have a simple << operator too.
mu2e -c Print/fcl/fileDumper.fclThis print will compute the average size of the products in the file. example output
artProductSizes file
mu2e -c Print/fcl/events.fclTo count the runs, events and subruns in the file
mu2e -c Print/fcl/count.fclTo print the piece of the SAM record which is derived from the file
mu2e -c Print/fcl/printSam.fcl
This module fcl can be modified to also print the begin run and subrun numbers. See events.fcl for options.
|
|
|
| Security, Privacy, Legal |
|