Functions | Variables
test_FixedChannelGroupService.cxx File Reference
#include "../FixedChannelGroupService.h"
#include <string>
#include <iostream>
#include <sstream>
#include <fstream>
#include <iomanip>
#include "dunecore/ArtSupport/ArtServiceHelper.h"
#include "dunecore/DuneServiceAccess/DuneServiceAccess.h"
#include <cassert>

Go to the source code of this file.

Functions

int test_FixedChannelGroupService ()
 
int main (int argc, char *argv[])
 

Variables

const std::string LArPropertiesServiceConfigurationString
 
const std::string DetectorPropertiesServiceConfigurationString
 

Function Documentation

int main ( int  argc,
char *  argv[] 
)

Definition at line 80 of file test_FixedChannelGroupService.cxx.

80  {
81  if ( argc > 1 ) {
82  cout << "Usage: " << argv[0] << endl;
83  }
85 }
int test_FixedChannelGroupService()
QTextStream & endl(QTextStream &s)
int test_FixedChannelGroupService ( )

Definition at line 30 of file test_FixedChannelGroupService.cxx.

30  {
31  const string myname = "test_FixedChannelGroupService: ";
32 #ifdef NDEBUG
33  cout << myname << "NDEBUG must be off." << endl;
34  abort();
35 #endif
36  const string line = "-----------------------------";
37 
38  cout << myname << line << endl;
39  cout << myname << "Create fcl file." << endl;
40  std::ostringstream oss;
41  oss << "services.ChannelGroupService: {" << endl;
42  oss << " service_provider: \"FixedChannelGroupService\"" << endl;
43  oss << " group1: [1, 2, 3, 4]" << endl;
44  oss << " group2: [11, 12, 13]" << endl;
45  oss << "}" << endl;
47 
48  cout << myname << line << endl;
49  cout << myname << "Fetch ChannelGroupService." << endl;
51  hcgs->print(cout, myname);
52 
53  unsigned int ngrp = hcgs->size();
54  cout << myname << "Check group count: " << ngrp << endl;
55  assert( ngrp == 2 );
56 
57  cout << myname << line << endl;
58  cout << myname << "Group names and channels:" << endl;
59  for ( unsigned int igrp=0; igrp<ngrp; ++igrp ) {
60  string name = hcgs->name(igrp);
61  const vector<ChannelGroupService::Index> chans = hcgs->channels(igrp);
62  cout << myname << " " << setw(10) << name << ":";
63  for ( ChannelGroupService::Index chan : chans ) cout << setw(6) << chan;
64  cout << endl;
65  assert( name.size() );
66  assert( name != "NoSuchGroup" );
67  assert( chans.size() );
68  }
69 
70  cout << myname << line << endl;
71  cout << myname << "Fetch ChannelGroupService by pointer." << endl;
73  pcgs->print(cout, myname);
74 
75  cout << myname << line << endl;
76  cout << myname << "Done." << endl;
77  return 0;
78 }
static QCString name
Definition: declinfo.cpp:673
virtual Index size() const =0
static void load_services(std::string const &config)
virtual std::ostream & print(std::ostream &out=std::cout, std::string prefix="") const =0
virtual const ChannelVector & channels(Index igrp) const =0
ChannelGroupService * ArtServicePointer< ChannelGroupService >()
Q_EXPORT QTSManip setw(int w)
Definition: qtextstream.h:331
virtual Name name(Index igrp) const =0
void line(double t, double *p, double &x, double &y, double &z)
QTextStream & endl(QTextStream &s)

Variable Documentation

const std::string DetectorPropertiesServiceConfigurationString
Initial value:
{ R"cfg(
service_provider: "DetectorPropertiesServiceStandard"
# Drift properties
SternheimerA: 0.1956 # Ar Sternheimer parameter a.
SternheimerK: 3.0000 # Ar Sternheimer parameter k.
SternheimerX0: 0.2000 # Ar Sternheimer parameter x0.
SternheimerX1: 3.0000 # Ar Sternheimer parameter x0.
SternheimerCbar: 5.2146 # Ar Sternheimer parameter Cbar.
Temperature: 87
Electronlifetime: 3.0e3
Efield: [0.5,0.666,0.8] #(predicted for microBooNE)
ElectronsToADC: 6.8906513e-3 # 1fC = 43.008 ADC counts for DUNE fd
NumberTimeSamples: 4492 # drift length/drift velocity*sampling rate = (359.4 cm)/(0.16 cm/us)*(2 MHz)
ReadOutWindowSize: 4492 # drift length/drift velocity*sampling rate = (359.4 cm)/(0.16 cm/us)*(2 MHz)
TimeOffsetU: 0.
TimeOffsetV: 0.
TimeOffsetZ: 0.
DriftVelFudgeFactor: 1.
SimpleBoundaryProcess: true #enable opticalBoundaryProcessSimple instead of G4 default
)cfg"}

Definition at line 346 of file test_ExponentialChannelNoiseService.cxx.

const std::string LArPropertiesServiceConfigurationString

Definition at line 262 of file test_ExponentialChannelNoiseService.cxx.