Public Member Functions | Private Attributes | List of all members
pmtana::PMTAna Class Reference
Inheritance diagram for pmtana::PMTAna:
art::EDAnalyzer art::detail::Analyzer art::detail::LegacyModule art::Observer art::ModuleBase

Public Member Functions

 PMTAna (const fhicl::ParameterSet &)
 Constructor. More...
 
void analyze (const art::Event &)
 Function to be called per event. More...
 
- Public Member Functions inherited from art::EDAnalyzer
 EDAnalyzer (fhicl::ParameterSet const &pset)
 
template<typename Config >
 EDAnalyzer (Table< Config > const &config)
 
std::string workerType () const
 
- Public Member Functions inherited from art::detail::Analyzer
virtual ~Analyzer () noexcept
 
 Analyzer (fhicl::ParameterSet const &pset)
 
template<typename Config >
 Analyzer (Table< Config > const &config)
 
void doBeginJob (SharedResources const &resources)
 
void doEndJob ()
 
void doRespondToOpenInputFile (FileBlock const &fb)
 
void doRespondToCloseInputFile (FileBlock const &fb)
 
void doRespondToOpenOutputFiles (FileBlock const &fb)
 
void doRespondToCloseOutputFiles (FileBlock const &fb)
 
bool doBeginRun (RunPrincipal &rp, ModuleContext const &mc)
 
bool doEndRun (RunPrincipal &rp, ModuleContext const &mc)
 
bool doBeginSubRun (SubRunPrincipal &srp, ModuleContext const &mc)
 
bool doEndSubRun (SubRunPrincipal &srp, ModuleContext const &mc)
 
bool doEvent (EventPrincipal &ep, ModuleContext const &mc, std::atomic< std::size_t > &counts_run, std::atomic< std::size_t > &counts_passed, std::atomic< std::size_t > &counts_failed)
 
- Public Member Functions inherited from art::Observer
 ~Observer () noexcept
 
 Observer (Observer const &)=delete
 
 Observer (Observer &&)=delete
 
Observeroperator= (Observer const &)=delete
 
Observeroperator= (Observer &&)=delete
 
void registerProducts (ProductDescriptions &, ModuleDescription const &)
 
void fillDescriptions (ModuleDescription const &)
 
fhicl::ParameterSetID selectorConfig () const
 
- Public Member Functions inherited from art::ModuleBase
virtual ~ModuleBase () noexcept
 
 ModuleBase ()
 
ModuleDescription const & moduleDescription () const
 
void setModuleDescription (ModuleDescription const &)
 
std::array< std::vector< ProductInfo >, NumBranchTypes > const & getConsumables () const
 
void sortConsumables (std::string const &current_process_name)
 
template<typename T , BranchType BT>
ViewToken< T > consumesView (InputTag const &tag)
 
template<typename T , BranchType BT>
ViewToken< T > mayConsumeView (InputTag const &tag)
 

Private Attributes

std::string _fifo_mod_name
 Input FIFOChannel producer name. More...
 
TTree * _tree
 output data holder TTree More...
 
PulseRecoManager _preco_man
 
AlgoThreshold _th_algo
 
AlgoFixedWindow _fw_algo
 
PedAlgoEdges _ped_algo
 

Additional Inherited Members

- Public Types inherited from art::EDAnalyzer
using WorkerType = WorkerT< EDAnalyzer >
 
using ModuleType = EDAnalyzer
 
- Protected Member Functions inherited from art::Observer
std::string const & processName () const
 
bool wantAllEvents () const noexcept
 
bool wantEvent (ScheduleID id, Event const &e) const
 
Handle< TriggerResultsgetTriggerResults (Event const &e) const
 
 Observer (fhicl::ParameterSet const &config)
 
 Observer (std::vector< std::string > const &select_paths, std::vector< std::string > const &reject_paths, fhicl::ParameterSet const &config)
 
- Protected Member Functions inherited from art::ModuleBase
ConsumesCollectorconsumesCollector ()
 
template<typename T , BranchType = InEvent>
ProductToken< T > consumes (InputTag const &)
 
template<typename Element , BranchType = InEvent>
ViewToken< Element > consumesView (InputTag const &)
 
template<typename T , BranchType = InEvent>
void consumesMany ()
 
template<typename T , BranchType = InEvent>
ProductToken< T > mayConsume (InputTag const &)
 
template<typename Element , BranchType = InEvent>
ViewToken< Element > mayConsumeView (InputTag const &)
 
template<typename T , BranchType = InEvent>
void mayConsumeMany ()
 

Detailed Description

PMTAna module to copy LArSoft data contents into LArLight data formatted file

Definition at line 46 of file PMTAna_module.cc.

Constructor & Destructor Documentation

pmtana::PMTAna::PMTAna ( const fhicl::ParameterSet )

Constructor.

Definition at line 76 of file PMTAna_module.cc.

76  :
77  EDAnalyzer(pset),
78  _preco_man(),
79  _th_algo(),
80  _fw_algo(),
81  _ped_algo()
82  //#######################################################################################################
83  {
84 
85  // Obtain module names for input data
86  _fifo_mod_name = pset.get<std::string>("fModName_FIFOChannel" );
87 
88  // Next we make storage data class objects for those data types specified in fcl files.
90 
91  // Create TTree
92  _tree = fileService->make<TTree>("pmt_tree","Analysis Tree");
93 
94  //
95  // Demonstration purpose ...
96  //
100 
101  }
AlgoFixedWindow _fw_algo
TTree * _tree
output data holder TTree
std::string string
Definition: nybbler.cc:12
EDAnalyzer(fhicl::ParameterSet const &pset)
Definition: EDAnalyzer.h:25
void AddRecoAlgo(pmtana::PMTPulseRecoBase *algo, PMTPedestalBase *ped_algo=nullptr)
A method to set pulse reconstruction algorithm.
AlgoThreshold _th_algo
PedAlgoEdges _ped_algo
std::string _fifo_mod_name
Input FIFOChannel producer name.
PulseRecoManager _preco_man
void SetDefaultPedAlgo(pmtana::PMTPedestalBase *algo)
A method to set a choice of pedestal estimation method.

Member Function Documentation

void pmtana::PMTAna::analyze ( const art::Event evt)

Function to be called per event.

Definition at line 104 of file PMTAna_module.cc.

106  {
107 
108  //data_ptr->set_event(evt.id().event(), evt.run(), evt.subRun());
109 
110 // std::vector<const optdata::FIFOChannel*> pmtArray;
111  std::vector<const raw::OpDetWaveform*> pmtArray;
112  try{
113 
114  evt.getView(_fifo_mod_name,pmtArray);
115 
116  }catch (art::Exception const& e) {
117 
118  if (e.categoryCode() != art::errors::ProductNotFound ) throw;
119 
120  }
121 
122 
123 
124 
125  for(size_t i=0; i<pmtArray.size(); ++i) {
126 
127 // const optdata::FIFOChannel* fifo_ptr(pmtArray.at(i));
128  const raw::OpDetWaveform* fifo_ptr(pmtArray.at(i));
129 
130  _preco_man.Reconstruct(*fifo_ptr);
131 
132  //
133  // here I add code to store reco-ed pulse w/ channel number
134  // OR I may make a singleton storage manager...
135 
136  /*
137  data_ptr->add_pmtfifo(fifo_ptr->ChannelNumber(),
138  fifo_ptr->Category(),
139  fifo_ptr->Frame(),
140  fifo_ptr->TimeSlice(),
141  *fifo_ptr);
142  */
143 
144  //
145  //
146  //
147  }
148 
149 
150  }
const double e
bool Reconstruct(const pmtana::Waveform_t &) const
Implementation of ana_base::analyze method.
std::string _fifo_mod_name
Input FIFOChannel producer name.
PulseRecoManager _preco_man
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
Definition: Exception.h:66
std::size_t getView(std::string const &moduleLabel, std::string const &productInstanceName, std::string const &processName, std::vector< ELEMENT const * > &result) const
Definition: DataViewImpl.h:500

Member Data Documentation

std::string pmtana::PMTAna::_fifo_mod_name
private

Input FIFOChannel producer name.

Definition at line 58 of file PMTAna_module.cc.

AlgoFixedWindow pmtana::PMTAna::_fw_algo
private

Definition at line 63 of file PMTAna_module.cc.

PedAlgoEdges pmtana::PMTAna::_ped_algo
private

Definition at line 64 of file PMTAna_module.cc.

PulseRecoManager pmtana::PMTAna::_preco_man
private

Definition at line 61 of file PMTAna_module.cc.

AlgoThreshold pmtana::PMTAna::_th_algo
private

Definition at line 62 of file PMTAna_module.cc.

TTree* pmtana::PMTAna::_tree
private

output data holder TTree

Definition at line 59 of file PMTAna_module.cc.


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