All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Private Attributes | List of all members
ana::TPCPurityInfoAna Class Reference
Inheritance diagram for ana::TPCPurityInfoAna:

Public Member Functions

 TPCPurityInfoAna (fhicl::ParameterSet const &p)
 
 TPCPurityInfoAna (TPCPurityInfoAna const &)=delete
 
 TPCPurityInfoAna (TPCPurityInfoAna &&)=delete
 
TPCPurityInfoAnaoperator= (TPCPurityInfoAna const &)=delete
 
TPCPurityInfoAnaoperator= (TPCPurityInfoAna &&)=delete
 
void analyze (art::Event const &e) override
 
void beginJob () override
 

Private Attributes

art::InputTag const fPurityInfoLabel
 
TNtuple * fPurityTuple
 
bool fPrintInfo
 

Detailed Description

Definition at line 32 of file TPCPurityInfoAna_module.cc.

Constructor & Destructor Documentation

ana::TPCPurityInfoAna::TPCPurityInfoAna ( fhicl::ParameterSet const &  p)
explicit

Definition at line 58 of file TPCPurityInfoAna_module.cc.

59  : EDAnalyzer{p} // ,
60  , fPurityInfoLabel(p.get<art::InputTag>("PurityInfoLabel"))
61  , fPrintInfo(p.get<bool>("PrintInfo",false))
62 {
63  consumes< std::vector<anab::TPCPurityInfo> >(fPurityInfoLabel);
64 }
pdgs p
Definition: selectors.fcl:22
art::InputTag const fPurityInfoLabel
ana::TPCPurityInfoAna::TPCPurityInfoAna ( TPCPurityInfoAna const &  )
delete
ana::TPCPurityInfoAna::TPCPurityInfoAna ( TPCPurityInfoAna &&  )
delete

Member Function Documentation

void ana::TPCPurityInfoAna::analyze ( art::Event const &  e)
override

Definition at line 75 of file TPCPurityInfoAna_module.cc.

76 {
77 
78  if(fPrintInfo)
79  std::cout << "Processing Run " << e.run()
80  << ", Subrun " << e.subRun()
81  << ", Event " << e.event()
82  << ":" << std::endl;
83 
84  art::Handle< std::vector<anab::TPCPurityInfo> > purityInfoHandle;
85  e.getByLabel(fPurityInfoLabel,purityInfoHandle);
86  auto const& purityInfoVec(*purityInfoHandle);
87 
88  if(fPrintInfo)
89  std::cout << "\tThere are " << purityInfoVec.size() << " purity info objects in the event."
90  << std::endl;
91 
92  for(auto const& pinfo : purityInfoVec){
93  if(fPrintInfo) pinfo.Print();
94  fPurityTuple->Fill(e.run(),e.subRun(),e.event(),pinfo.Cryostat,pinfo.TPC,pinfo.Wires,pinfo.Ticks,pinfo.Attenuation,pinfo.FracError);
95  }
96 
97 
98 }
do i e
art::InputTag const fPurityInfoLabel
BEGIN_PROLOG could also be cout
void ana::TPCPurityInfoAna::beginJob ( )
override

Definition at line 66 of file TPCPurityInfoAna_module.cc.

67 {
68 
69  // get access to the TFile service
70  art::ServiceHandle<art::TFileService> tfs;
71 
72  fPurityTuple = tfs->make<TNtuple>("purityTuple","Purity Tuple","run:subrun:ev:cryo:tpc:wires:ticks:att:err");
73 
74 }
art::ServiceHandle< art::TFileService > tfs
TPCPurityInfoAna& ana::TPCPurityInfoAna::operator= ( TPCPurityInfoAna const &  )
delete
TPCPurityInfoAna& ana::TPCPurityInfoAna::operator= ( TPCPurityInfoAna &&  )
delete

Member Data Documentation

bool ana::TPCPurityInfoAna::fPrintInfo
private

Definition at line 53 of file TPCPurityInfoAna_module.cc.

art::InputTag const ana::TPCPurityInfoAna::fPurityInfoLabel
private

Definition at line 50 of file TPCPurityInfoAna_module.cc.

TNtuple* ana::TPCPurityInfoAna::fPurityTuple
private

Definition at line 51 of file TPCPurityInfoAna_module.cc.


The documentation for this class was generated from the following file: