Classes | Typedefs | Functions
lris Namespace Reference

Conversion of binary data to root files. More...

Classes

class  LArRawInputDriver
 
class  LArRawInputDriverJP250L
 
class  LArRawInputDriverLongBo
 
class  LArRawInputDriverShortBo
 
class  PDDPRawInputDriver
 
class  RawData311InputDriver
 

Typedefs

typedef art::Source< RawData311InputDriverImportFull311File
 
typedef art::Source< PDDPRawInputDriverPDDPRawInput
 
typedef art::Source< LArRawInputDriverLongBoLArRawInputSourceLB
 
typedef art::Source< LArRawInputDriverShortBoLArRawInputSourceSB
 

Functions

void SplitAdc (const std::vector< dlardaq::adc16_t > *adc, size_t channel, uint32_t num_samples, std::vector< short > &adclist)
 
size_t Get311Chan (size_t LAr_chan)
 
void ReadPedestalFile (std::string PedestalFileName, std::vector< std::pair< double, double > > &PedMap)
 

Detailed Description

Conversion of binary data to root files.

Typedef Documentation

Definition at line 7 of file ImportFull311File_source.cc.

Definition at line 12 of file LArRawInputSourceLB_source.cc.

Definition at line 12 of file LArRawInputSourceSB_source.cc.

Definition at line 7 of file PDDPRawInput_source.cc.

Function Documentation

size_t lris::Get311Chan ( size_t  LAr_chan)

Definition at line 43 of file RawData311InputDriver_service.cc.

43  {
44  size_t crate = LAr_chan / 320;
45  size_t Chan311;
46 
47  LAr_chan = 8*(LAr_chan/8+1)-LAr_chan%8 -1;
48 
49  if(crate == 0)
50  {
51  LAr_chan = 32*(LAr_chan/32+1)-LAr_chan%32 -1;
52  size_t card = 4 - ((LAr_chan / 32) % 5);
53  if(LAr_chan > 159)
54  {
55  size_t shift = 31 - (LAr_chan % 32);
56  Chan311 = (2*card)*32 + shift;
57  }
58  else
59  {
60  size_t shift = 31 - (LAr_chan % 32);
61  Chan311 = (2*card + 1)*32 + shift;
62  }
63  }
64  else
65  {
66  size_t new_LAr_chan = LAr_chan - crate*320;
67  size_t card = ((new_LAr_chan / 32) % 5);
68  if(new_LAr_chan > 159)
69  {
70  size_t shift = new_LAr_chan % 32;
71  Chan311 = (2*card)*32 + shift;
72  }
73  else
74  {
75  size_t shift = new_LAr_chan % 32;
76  Chan311 = (2*card + 1)*32 + shift;
77  }
78  Chan311 = Chan311 + crate*320;
79  } // end of if/else statementi
80 
81  return Chan311;
82  } // Get311Chan
struct dune::tde::crate crate
void lris::ReadPedestalFile ( std::string  PedestalFileName,
std::vector< std::pair< double, double > > &  PedMap 
)

Definition at line 90 of file RawData311InputDriver_service.cc.

90  {
91  //initialize the channel-ped value map
92  std::ifstream file;
93  file.open(PedestalFileName);
94  if( !file.is_open() )
95  {
97  << "failed to open input file " << PedestalFileName << "\n";
98  }
99 
100  while(!file.eof())
101  {
102  size_t ch, cryo, crate, rawch;
103  double mean, rms;
104  file >> rawch >> cryo >> crate >> ch >> mean >> rms;
105  PedMap.emplace_back(mean, rms);
106  }
107 
108  file.close();
109  return;
110  }//Read Pedestal File()
double rms(sqlite3 *db, std::string const &table_name, std::string const &column_name)
Definition: statistics.cc:40
struct dune::tde::crate crate
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
Definition: Exception.h:66
double mean(sqlite3 *db, std::string const &table_name, std::string const &column_name)
Definition: statistics.cc:16
void lris::SplitAdc ( const std::vector< dlardaq::adc16_t > *  adc,
size_t  channel,
uint32_t  num_samples,
std::vector< short > &  adclist 
)

Definition at line 32 of file RawData311InputDriver_service.cc.

34  {
35  for(uint32_t i = 0; i < num_samples; i++)
36  {
37  adclist.emplace_back(adc->at(channel*num_samples + i));
38  }
39  }// SplitAdc
uint8_t channel
Definition: CRTFragment.hh:201