All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
LArRawInputDriverJP250L.h
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////
2 /// \file LArRawInputDriverJP250L.h
3 /// \brief Source to convert JP250L files to LArSoft files
4 ///
5 /// \author eito@post.kek.jp, brebel@fnal.gov
6 ////////////////////////////////////////////////////////////////////////
7 
8 #include <string>
9 
10 namespace art {
11  class EventPrincipal;
12  class FileBlock;
13  class ProductRegistryHelper;
14  class RunPrincipal;
15  class SourceHelper;
16  class SubRunPrincipal;
17 }
18 namespace fhicl { class ParameterSet; }
19 
20 class TTree;
21 
22 ///Conversion of binary data to root files
23 namespace lris {
24  class LArRawInputDriverJP250L;
25 }
26 
28  /// Class to fill the constraints on a template argument to the class,
29  /// FileReaderSource
30  public:
31  // Required constructor
32  LArRawInputDriverJP250L(fhicl::ParameterSet const &pset,
33  art::ProductRegistryHelper &helper,
34  art::SourceHelper const &pm);
35 
36  // Required by FileReaderSource:
37  void closeCurrentFile();
38  void readFile(std::string const &name,
39  art::FileBlock* &fb);
40  bool readNext(art::RunPrincipal* const &inR,
41  art::SubRunPrincipal* const &inSR,
42  art::RunPrincipal* &outR,
43  art::SubRunPrincipal* &outSR,
44  art::EventPrincipal* &outE);
45 
46  private:
47 
48  // --- data members:
49  art::SourceHelper const& principalMaker_;
50 
51  // added by E.Iwai
52  TTree* m_eventTree; ///< TTree containing information from each trigger
53  unsigned int m_nEvent; ///< number of triggers in the TTree
54  unsigned int m_current; ///< current entry in the TTree
55  unsigned short m_runID; ///< run ID, has to start from 1
56  unsigned int m_unixtime; ///< unix timestamp of the start of the run
57  unsigned short m_nChannels; ///< number of channels in the detector
58  unsigned short m_nSamples; ///< number of time samples per channel
59  unsigned short* m_data; ///< the ADC of each time sample for each channel
60 
61 }; // LArRawInputDriverJP250L
unsigned int m_unixtime
unix timestamp of the start of the run
unsigned int m_nEvent
number of triggers in the TTree
void readFile(std::string const &name, art::FileBlock *&fb)
unsigned short m_runID
run ID, has to start from 1
LArRawInputDriverJP250L(fhicl::ParameterSet const &pset, art::ProductRegistryHelper &helper, art::SourceHelper const &pm)
TTree * m_eventTree
TTree containing information from each trigger.
unsigned short * m_data
the ADC of each time sample for each channel
bool readNext(art::RunPrincipal *const &inR, art::SubRunPrincipal *const &inSR, art::RunPrincipal *&outR, art::SubRunPrincipal *&outSR, art::EventPrincipal *&outE)
unsigned short m_nChannels
number of channels in the detector
unsigned short m_nSamples
number of time samples per channel
art::SourceHelper const & principalMaker_
then echo fcl name
unsigned int m_current
current entry in the TTree