All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ChannelMapPostGres_tool.cc
Go to the documentation of this file.
1 /**
2  * @file ChannelMapPostGres_tool.cc
3  *
4  * @brief This tool converts from daq to LArSoft format with noise filtering
5  *
6  */
7 
8 // Framework Includes
9 #include "art/Framework/Core/EDProducer.h"
10 #include "art/Framework/Services/Registry/ServiceHandle.h"
11 #include "art/Persistency/Common/PtrMaker.h"
12 #include "art/Utilities/ToolMacros.h"
13 #include "art/Utilities/make_tool.h"
14 #include "cetlib/cpu_timer.h"
15 #include "fhiclcpp/ParameterSet.h"
16 #include "messagefacility/MessageLogger/MessageLogger.h"
17 #include "wda.h"
18 
19 // LArSoft includes
21 
22 // std includes
23 #include <string>
24 #include <iostream>
25 #include <memory>
26 
27 //------------------------------------------------------------------------------------------------------------------------------------------
28 // implementation follows
29 
30 namespace icarusDB {
31 /**
32  * @brief ChannelMapPostGres class definiton
33  */
34 class ChannelMapPostGres : virtual public IChannelMapping
35 {
36 public:
37  /**
38  * @brief Constructor
39  *
40  * @param pset
41  */
42  explicit ChannelMapPostGres(fhicl::ParameterSet const &pset);
43 
44  /**
45  * @brief Destructor
46  */
48 
49  /**
50  * @brief Define the returned data structures for a mapping between TPC Fragment IDs
51  * and the related crate and readout information.
52  * Then define the function interface to fill these data structures
53  */
55 
56  /**
57  * @brief Define the returned data structures for a mapping between TPC readout boards
58  * and the channel information
59  * Then define the function interface to fill these data structures
60  */
62 
63  /**
64  * @brief Define the returned data structures for a mapping between PMT Fragment IDs
65  * and the related crate and readout information.
66  * Then define the function interface to fill these data structures
67  */
69 
70 
71  /**
72  * @brief Define the returned data structures for a mapping between CRT hardware mac_address
73  * to the simulated mac_address.
74  * Then define the function interface to fill these data structures
75  */
78 
79  /**
80  * @brief Define the returned data structures for a mapping between Side CRT Channels and
81  * their calibration values.
82  * Then define the function interface to fill these data structures
83  */
85 
86 private:
87  // Recover data from postgres database
88  int GetDataset(const std::string&, const std::string&, const std::string&, Dataset&) const;
89  int GetCRTCaldata(const std::string&, const std::string&, Dataset&) const;
90  uint32_t fNothing; //< Nothing
91 
92 };
93 
94 ChannelMapPostGres::ChannelMapPostGres(fhicl::ParameterSet const &pset)
95 {
96  fNothing = pset.get<uint32_t>("Nothing");
97 
98  return;
99 }
100 
101 //------------------------------------------------------------------------------------------------------------------------------------------
102 
104 {
105 }
106 
107 // -----------------------------------------------------
108 // This Function does the basic information retrieval
109 // One passes in the type of data requested and a reference to the data holder
110 // The function connects via the libwda function to recover the
111 // data and checks to insure there were not connection errors.
112 // The function returns the error status, if null then success
113 //-----------------------------------------------------
114 int ChannelMapPostGres::GetDataset(const std::string& name, const std::string& url, const std::string& dataType, Dataset& dataSet) const
115 {
116  const int timeout(200);
117  std::string dburl = url + "&t=" + dataType;
118  int error(0);
119  dataSet = getDataWithTimeout(dburl.data(),name.data(),timeout,&error);
120  if (error)
121  {
122  std::string errorMsg = "Database access GetDataset failed with error " + std::to_string(error) + "\nDB url: "
123  + dburl + ", name: " + name + ", type: " + dataType;
124  std::cout << "****> Database retrieval error, code: " << error << std::endl;
125  throw std::runtime_error(errorMsg);
126  }
127 
128  return error;
129 }
130 
131  //Adding this so I can control how this workflow goes -TB
132  int ChannelMapPostGres::GetCRTCaldata(const std::string& name, const std::string& url, Dataset& dataSet) const
133  {
134  const int timeout(200);
135  int error(0);
136  dataSet = getDataWithTimeout(url.c_str(),name.c_str(),timeout,&error);
137  if (error)
138  {
139  std::string errorMsg = "Database access GetDataset failed with error " + std::to_string(error) + "\nurl: "
140  + url + ", name: " + name;
141  std::cout << "****> Database retrieval error, code: " << error << std::endl;
142  throw std::runtime_error(errorMsg);
143  }
144 
145  return error;
146  }
147 
148 
149 // -----------------------------------------------------
150 // The aim of this function is to build a map between the
151 // TPC Fragment IDs and the readout board IDs. Here we
152 // expect there will be some number of boards per Fragment
153 //-----------------------------------------------------
155 {
156  const unsigned int tpcIdentifier(0x00001000);
157  const std::string name("icarus_hw_readoutboard");
158  const std::string dburl("https://dbdata0vm.fnal.gov:9443/QE/hw/app/SQ/query?dbname=icarus_hardware_prd");
159  const std::string dataType("readout_boards");
160  Dataset dataset;
161  // Recover the data from the database
162  int error = GetDataset(name,dburl,dataType,dataset);
163  // Include a by hand mapping of fragement ID to crate
164  using FlangeIDToCrateMap = std::map<size_t,std::string>;
165  FlangeIDToCrateMap flangeIDToCrateMap;
166  flangeIDToCrateMap[19] = "WW01T";
167  flangeIDToCrateMap[68] = "WW01M";
168  flangeIDToCrateMap[41] = "WW01B";
169  flangeIDToCrateMap[11] = "WW02";
170  flangeIDToCrateMap[17] = "WW03";
171  flangeIDToCrateMap[36] = "WW04";
172  flangeIDToCrateMap[18] = "WW05";
173  flangeIDToCrateMap[58] = "WW06";
174  flangeIDToCrateMap[71] = "WW07";
175  flangeIDToCrateMap[14] = "WW08";
176  flangeIDToCrateMap[25] = "WW09";
177  flangeIDToCrateMap[34] = "WW10";
178  flangeIDToCrateMap[67] = "WW11";
179  flangeIDToCrateMap[33] = "WW12";
180  flangeIDToCrateMap[87] = "WW13";
181  flangeIDToCrateMap[10] = "WW14";
182  flangeIDToCrateMap[59] = "WW15";
183  flangeIDToCrateMap[95] = "WW16";
184  flangeIDToCrateMap[22] = "WW17";
185  flangeIDToCrateMap[91] = "WW18";
186  flangeIDToCrateMap[61] = "WW19";
187  flangeIDToCrateMap[55] = "WW20T";
188  flangeIDToCrateMap[97] = "WW20M";
189  flangeIDToCrateMap[100] = "WW20B";
190  flangeIDToCrateMap[83] = "WE01T";
191  flangeIDToCrateMap[85] = "WE01M";
192  flangeIDToCrateMap[7] = "WE01B";
193  flangeIDToCrateMap[80] = "WE02";
194  flangeIDToCrateMap[52] = "WE03";
195  flangeIDToCrateMap[32] = "WE04";
196  flangeIDToCrateMap[70] = "WE05";
197  flangeIDToCrateMap[74] = "WE06";
198  flangeIDToCrateMap[46] = "WE07";
199  flangeIDToCrateMap[81] = "WE08";
200  flangeIDToCrateMap[63] = "WE09";
201  flangeIDToCrateMap[30] = "WE10";
202  flangeIDToCrateMap[51] = "WE11";
203  flangeIDToCrateMap[90] = "WE12";
204  flangeIDToCrateMap[23] = "WE13";
205  flangeIDToCrateMap[93] = "WE14";
206  flangeIDToCrateMap[92] = "WE15";
207  flangeIDToCrateMap[88] = "WE16";
208  flangeIDToCrateMap[73] = "WE17";
209  flangeIDToCrateMap[1] = "WE18";
210  flangeIDToCrateMap[66] = "WE19";
211  flangeIDToCrateMap[48] = "WE20T";
212  flangeIDToCrateMap[13] = "WE20M";
213  flangeIDToCrateMap[56] = "WE20B";
214  flangeIDToCrateMap[94] = "EW01T";
215  flangeIDToCrateMap[77] = "EW01M";
216  flangeIDToCrateMap[72] = "EW01B";
217  flangeIDToCrateMap[65] = "EW02";
218  flangeIDToCrateMap[4] = "EW03";
219  flangeIDToCrateMap[89] = "EW04";
220  flangeIDToCrateMap[37] = "EW05";
221  flangeIDToCrateMap[76] = "EW06";
222  flangeIDToCrateMap[49] = "EW07";
223  flangeIDToCrateMap[60] = "EW08";
224  flangeIDToCrateMap[21] = "EW09";
225  flangeIDToCrateMap[6] = "EW10";
226  flangeIDToCrateMap[62] = "EW11";
227  flangeIDToCrateMap[2] = "EW12";
228  flangeIDToCrateMap[29] = "EW13";
229  flangeIDToCrateMap[44] = "EW14";
230  flangeIDToCrateMap[9] = "EW15";
231  flangeIDToCrateMap[31] = "EW16";
232  flangeIDToCrateMap[98] = "EW17";
233  flangeIDToCrateMap[38] = "EW18";
234  flangeIDToCrateMap[99] = "EW19";
235  flangeIDToCrateMap[53] = "EW20T";
236  flangeIDToCrateMap[82] = "EW20M";
237  flangeIDToCrateMap[35] = "EW20B";
238  flangeIDToCrateMap[96] = "EE01T";
239  flangeIDToCrateMap[28] = "EE01M";
240  flangeIDToCrateMap[16] = "EE01T";
241  flangeIDToCrateMap[69] = "EE02";
242  flangeIDToCrateMap[20] = "EE02";
243  flangeIDToCrateMap[79] = "EE02";
244  flangeIDToCrateMap[50] = "EE02";
245  flangeIDToCrateMap[45] = "EE02";
246  flangeIDToCrateMap[84] = "EE02";
247  flangeIDToCrateMap[42] = "EE02";
248  flangeIDToCrateMap[39] = "EE02";
249  flangeIDToCrateMap[26] = "EE02";
250  flangeIDToCrateMap[64] = "EE02";
251  flangeIDToCrateMap[43] = "EE02";
252  flangeIDToCrateMap[47] = "EE02";
253  flangeIDToCrateMap[15] = "EE02";
254  flangeIDToCrateMap[3] = "EE02";
255  flangeIDToCrateMap[27] = "EE02";
256  flangeIDToCrateMap[24] = "EE02";
257  flangeIDToCrateMap[40] = "EE02";
258  flangeIDToCrateMap[75] = "EE02";
259  flangeIDToCrateMap[86] = "EE20T";
260  flangeIDToCrateMap[54] = "EE20M";
261  flangeIDToCrateMap[8] = "EE20B";
262  // If there was an error the function above would have printed a message so bail out
263  if (error) throw(std::exception());
264  // Loop through the data to recover the channels
265  // NOTE that we skip the first row because that is just the labels
266  for(int row = 1; row < getNtuples(dataset); row++)
267  {
268  // Recover the row
269  Tuple tuple = getTuple(dataset, row);
270  if (tuple != NULL)
271  {
272  // Note that the fragment ID is stored in the database as a string which reads as a hex number
273  // Meaning we have to read back as a string and decode to get the numerical value.
274  char fragmentBuffer[16];
275  getStringValue(tuple, 8, fragmentBuffer, sizeof(fragmentBuffer), &error);
276  if (error) throw std::runtime_error("Encountered error in trying to recover FragmentID from database");
277  std::string fragmentIDString(fragmentBuffer,4);
278  unsigned int fragmentID = std::stol(fragmentIDString,nullptr,16);
279  if (!(fragmentID & tpcIdentifier)) continue;
280  if (fragmentBoardMap.find(fragmentID) == fragmentBoardMap.end())
281  {
282  unsigned int flangeID = getLongValue(tuple, 1, &error);
283  if (error) throw std::runtime_error("Encountered error in trying to recover Board Flange ID from database");
284  fragmentBoardMap[fragmentID].first = flangeIDToCrateMap[flangeID];
285  }
286  unsigned int readoutID = getLongValue(tuple, 0, &error);
287  if (error) throw std::runtime_error("Encountered error in trying to recover Board ReadoutID from database");
288  fragmentBoardMap[fragmentID].second.emplace_back(readoutID);
289  releaseTuple(tuple);
290  }
291  }
292  return error;
293 }
294 
295 // -----------------------------------------------------
296 // The aim of this function is to build a map between the
297 // TPC readout board IDs and the associated channels. So for
298 // each readout board ID we expect a number of channels back
299 // from the data base. So the returned data structure will
300 // be a map of readout ID to a vector of channels
301 //-----------------------------------------------------
302 const unsigned int CHANNELSPERBOARD = 64;
304 {
305  const std::string name("icarus_hardware_prd");
306  const std::string dburl("https://dbdata0vm.fnal.gov:9443/QE/hw/app/SQ/query?dbname=icarus_hardware_prd");
307  const std::string dataType("daq_channels");
308  Dataset dataset;
309  // Recover the data from the database
310  int error = GetDataset(name,dburl,dataType,dataset);
311  // If there was an error the function above would have printed a message so bail out
312  if (error) throw std::runtime_error("Encountered error accessing the database with GetDataset");
313  // Loop through the data to recover the channels, making sure to skip the first (header) row
314  for(int row = 1; row < getNtuples(dataset); row++)
315  {
316  // Recover the row
317  Tuple tuple = getTuple(dataset, row);
318  if (tuple != NULL)
319  {
320  unsigned int readoutBoardID = getLongValue(tuple, 2, &error);
321  if (error) throw std::runtime_error("Encountered error when trying to read Board ReadoutID");
322  if (rbChanMap.find(readoutBoardID) == rbChanMap.end())
323  {
324  unsigned int readoutBoardSlot = getLongValue(tuple, 4, &error);
325  if (error) throw std::runtime_error("Encountered error when trying to read Board Readout slot");
326  rbChanMap[readoutBoardID].first = readoutBoardSlot;
327  rbChanMap[readoutBoardID].second.resize(CHANNELSPERBOARD);
328  }
329  unsigned int channelNum = getLongValue(tuple, 5, &error);
330  if (error) throw std::runtime_error("Encountered error when trying to read channel number");
331  unsigned int channelID = getLongValue(tuple, 0, &error);
332  if (error) throw std::runtime_error("Encountered error when recovering the channel ID list");
333  // Recover the plane identifier
334  char fragmentBuffer[16];
335  getStringValue(tuple, 10, fragmentBuffer, sizeof(fragmentBuffer), &error);
336  if (error) throw std::runtime_error("Encountered error when trying to read plane type");
337  // Make sure lower case... (sigh...)
338  for(size_t charIdx = 0; charIdx < sizeof(fragmentBuffer); charIdx++) fragmentBuffer[charIdx] = tolower(fragmentBuffer[charIdx]);
339  unsigned int plane(3);
340  if (strstr(fragmentBuffer,"collection")) plane = 2;
341  else if (strstr(fragmentBuffer,"induction 2")) plane = 1;
342  else if (strstr(fragmentBuffer,"induction 1")) plane = 0;
343  if (plane > 2) std::cout << "YIKES!!! Plane is " << plane << " for channel " << channelID << " with type " << std::string(fragmentBuffer) << std::endl;
344  rbChanMap[readoutBoardID].second[channelNum] = ChannelPlanePair(channelID,plane);
345  }
346  }
347 
348  return error;
349 }
350 
351 //******************* PMT Channel Mapping ***********************
353 {
354  // clearing is cleansing
355  fragmentToDigitizerChannelMap.clear();
356  // Recover the information from the database on the mapping
357  const std::string name("Pmt_placement");
358  const std::string dburl("https://dbdata0vm.fnal.gov:9443/QE/hw/app/SQ/query?dbname=icarus_hardware_prd");
359  const std::string dataType("pmt_placements");
360  Dataset dataset;
361  // Recover the data from the database
362  int error = GetDataset(name,dburl,dataType,dataset);
363  // If there was an error the function above would have printed a message so bail out
364  if (error) throw(std::exception());
365  // Ok, now we can start extracting the information
366  // We do this by looping through the database and building the map from that
367  for(int row = 1; row < getNtuples(dataset); row++)
368  {
369  // Recover the row
370  Tuple tuple = getTuple(dataset, row);
371  if (tuple != NULL)
372  {
373  char digitizerBuffer[10];
374  // Recover the digitizer label first
375  getStringValue(tuple, 8, digitizerBuffer, sizeof(digitizerBuffer), &error);
376  if (error) throw std::runtime_error("Encountered error when trying to recover the PMT digitizer label");
377  std::string digitizerLabel(digitizerBuffer, 8); //sizeof(digitizerBuffer));
378  // Recover the fragment id
379  unsigned fragmentID = getLongValue(tuple, 18, &error);
380  if (error) throw std::runtime_error("Encountered error when trying to recover the PMT fragment id");
381  // Now recover the digitizer channel number
382  unsigned int digitizerChannelNo = getLongValue(tuple, 9, &error);
383  if (error) throw std::runtime_error("Encountered error when trying to recover the PMT digitizer channel number");
384  // Finally, get the LArsoft channel ID
385  unsigned int channelID = getLongValue(tuple, 17, &error);
386  if (error) throw std::runtime_error("Encountered error when trying to recover the PMT channel ID");
387  // Fill the map
388  fragmentToDigitizerChannelMap[fragmentID].emplace_back(digitizerChannelNo,channelID);
389  releaseTuple(tuple);
390  }
391  }
392 
393  return error;
394 }
395 
396 
397 //******************* CRT Channel Mapping ***********************
398 
400  {
401  // clearing is cleansing
402  crtChannelIDToHWtoSimMacAddressPairMap.clear();
403  // Recover the information from the database on the mapping
404  const std::string name("Feb_channels");
405  const std::string dburl("https://dbdata0vm.fnal.gov:9443/QE/hw/app/SQ/query?dbname=icarus_hardware_prd");
406  const std::string dataType("feb_channels");
407  Dataset dataset;
408  // Recover the data from the database
409  int error = GetDataset(name,dburl,dataType,dataset);
410  // If there was an error the function above would have printed a message so bail out
411  if (error) throw(std::exception());
412  // Ok, now we can start extracting the information
413  // We do this by looping through the database and building the map from that
414  for(int row = 1; row < getNtuples(dataset); row++)
415  {
416  // Recover the row
417  Tuple tuple = getTuple(dataset, row);
418  if (tuple != NULL)
419  {
420  // Recover the simmacaddress
421  unsigned int simmacaddress = getLongValue(tuple, 11, &error);
422  if (error) throw std::runtime_error("Encountered error when trying to recover the CRT simmacaddress");
423  // Now recover the hwmacaddress
424  unsigned int hwmacaddress = getLongValue(tuple, 12, &error);
425  if (error) throw std::runtime_error("Encountered error when trying to recover the CRT hwmacaddress");
426  // Finally, get the LArsoft channel ID
427  unsigned int channelID = getLongValue(tuple, 10, &error);
428  if (error) throw std::runtime_error("Encountered error when trying to recover the CRT channel ID");
429  // Fill the map
430  crtChannelIDToHWtoSimMacAddressPairMap[channelID]=std::make_pair(hwmacaddress,simmacaddress);
431  releaseTuple(tuple);
432  }
433  }
434 
435  return error;
436  }
437 
438 
439  /// Top CRT harware mac5 to software mac5 relation
440  //----------------------------------------------------
442  {
443  // clearing is cleansing
444  topcrtHWtoSimMacAddressPairMap.clear();
445  // Recover the information from the database on the mapping
446  const std::string name("topcrt_febs");
447  const std::string dburl("https://dbdata0vm.fnal.gov:9443/QE/hw/app/SQ/query?dbname=icarus_hardware_prd");
448  const std::string dataType("crtfeb");
449  Dataset dataset;
450  // Recover the data from the database
451  int error = GetDataset(name,dburl,dataType,dataset);
452  // If there was an error the function above would have printed a message so bail out
453  if (error) throw(std::exception());
454  // Ok, now we can start extracting the information
455  // We do this by looping through the database and building the map from that
456  for(int row = 1; row < getNtuples(dataset); row++)
457  {
458  // Recover the row
459  Tuple tuple = getTuple(dataset, row);
460  if (tuple != NULL)
461  {
462  // Recover the simmacaddress
463  unsigned int simmacaddress = getLongValue(tuple, 41, &error);
464  if (error) throw std::runtime_error("Encountered error when trying to recover the CRT simmacaddress");
465  // Now recover the hwmacaddress
466  unsigned int hwmacaddress = getLongValue(tuple, 3, &error);
467  if (error) throw std::runtime_error("Encountered error when trying to recover the CRT hwmacaddress");
468 
469  // Fill the map
470  topcrtHWtoSimMacAddressPairMap[hwmacaddress] = simmacaddress;
471  releaseTuple(tuple);
472  }
473  }
474 
475  return error;
476  }
477 
478 
479  /// Accesing the Side CRT charge calibration from the postgresql database
480  //------------------------------------------------------------------------
481 
483  // sideCRTChannelToCalibrationMap.clear();
484  const std::string name("SideCRT_calibration_data");
485  const std::string dburl("https://dbdata0vm.fnal.gov:9443/icarus_con_prod/app/data?f=crt_gain_reco_data&t=1638918270");
486  Dataset ds;
487  // Recover the data from the database
488  int error = GetCRTCaldata(name,dburl,ds);
489  if (error)
490  { fprintf(stderr, "error code=%d\n", error); perror("error message"); }
491  if (getHTTPstatus(ds) != 200)
492  { fprintf(stderr, "HTTP code=%ld, message: '%s'\n", getHTTPstatus(ds), getHTTPmessage(ds)); }
493  int mac5, chan;
494  double gain, ped;
495  int err;
496  int nrows = getNtuples(ds);
497  int ncols;
498  Tuple tup;
499  for (int rows = 0; rows < nrows; rows++ ){
500  tup = getTuple(ds, rows); // Get the row with double array
501  ncols = getNfields(tup);//check number of columns
502  if(ncols <5) continue;//first few rows aren't actual data and have ncols==1, this excludes those
503  if (tup != NULL)/*check that the tup is not empty before proceeding*/ {
504  //assign values from the database to variables so we can use them
505  mac5 = (int)getDoubleValue(tup,1,&err);
506  chan = (int)getDoubleValue(tup,2,&err);
507  gain = getDoubleValue(tup,3,&err);
508  ped = getDoubleValue(tup,4,&err);
509  //This line adds the association between the two pairs to the map object
510  sideCRTChannelToCalibrationMap.insert(std::make_pair(std::make_pair(mac5,chan), std::make_pair(gain,ped)));
511 
512  releaseTuple(tup);
513  }//end if(tup != NULL)
514  else releaseTuple(tup);
515  }//end loop over rows
516 
517  return error;
518  }
519 
520 
521 DEFINE_ART_CLASS_TOOL(ChannelMapPostGres)
522 } // namespace lar_cluster3d
virtual int BuildTPCFragmentIDToReadoutIDMap(TPCFragmentIDToReadoutIDMap &) const override
Define the returned data structures for a mapping between TPC Fragment IDs and the related crate and ...
int GetCRTCaldata(const std::string &, const std::string &, Dataset &) const
ChannelMapPostGres(fhicl::ParameterSet const &pset)
Constructor.
EResult err(const char *call)
This provides an art tool interface definition for tools handle the channel mapping The idea is to be...
std::pair< unsigned int, unsigned int > ChannelPlanePair
Define the returned data structures for a mapping between TPC readout boards and the channel informat...
void * Tuple
Definition: DBFolder.h:13
std::map< unsigned int, CRTHWtoSimMacAddressPair > CRTChannelIDToHWtoSimMacAddressPairMap
virtual int BuildFragmentToDigitizerChannelMap(FragmentToDigitizerChannelMap &) const override
Define the returned data structures for a mapping between PMT Fragment IDs and the related crate and ...
std::map< unsigned int, SlotChannelVecPair > TPCReadoutBoardToChannelMap
virtual int BuildCRTChannelIDToHWtoSimMacAddressPairMap(CRTChannelIDToHWtoSimMacAddressPairMap &) const override
Define the returned data structures for a mapping between CRT hardware mac_address to the simulated m...
ChannelMapPostGres class definiton.
int GetDataset(const std::string &, const std::string &, const std::string &, Dataset &) const
void * Dataset
Definition: DBFolder.h:12
virtual int BuildTPCReadoutBoardToChannelMap(TPCReadoutBoardToChannelMap &) const override
Define the returned data structures for a mapping between TPC readout boards and the channel informat...
std::string to_string(WindowPattern const &pattern)
std::map< SideCRTMac5ToChannelPair, SideCRTGainToPedPair > SideCRTChannelToCalibrationMap
const unsigned int CHANNELSPERBOARD
std::map< unsigned int, CrateNameReadoutIDPair > TPCFragmentIDToReadoutIDMap
virtual int BuildSideCRTCalibrationMap(SideCRTChannelToCalibrationMap &) const override
Define the returned data structures for a mapping between Side CRT Channels and their calibration val...
then echo fcl name
std::map< size_t, DigitizerChannelChannelIDPairVec > FragmentToDigitizerChannelMap
virtual int BuildTopCRTHWtoSimMacAddressPairMap(TopCRTHWtoSimMacAddressPairMap &) const override
Top CRT harware mac5 to software mac5 relation.
IChannelMapping interface class definiton.
BEGIN_PROLOG could also be cout
std::map< unsigned int, unsigned int > TopCRTHWtoSimMacAddressPairMap