10 #include "art/Framework/Core/FileBlock.h" 
   11 #include "art/Framework/Core/ProductRegistryHelper.h" 
   12 #include "art/Framework/IO/Sources/SourceHelper.h" 
   13 #include "art/Framework/IO/Sources/put_product_in_principal.h" 
   14 #include "art/Framework/Principal/EventPrincipal.h" 
   15 #include "art/Framework/Principal/RunPrincipal.h" 
   16 #include "canvas/Utilities/Exception.h" 
   17 #include "canvas/Persistency/Provenance/FileFormatVersion.h" 
   18 #include "canvas/Persistency/Provenance/Timestamp.h" 
   19 #include "cetlib_except/coded_exception.h" 
   60     unsigned short  samples;   
 
   71   int run( std::string s1 )
 
   73     size_t p1 = s1.find(
"R");
 
   74     size_t p2 = s1.find(
"_E");
 
   76     int run = atoi((s1.substr(p1+1,p2-p1-1)).c_str());
 
   82   int event( std::string s1 )
 
   84     size_t p1 = s1.find(
"E");
 
   85     size_t p2 = s1.find(
"_T");
 
   87     int event = atoi((s1.substr(p1+1,p2-p1-1)).c_str());
 
   93   bool compare( std::string s1, std::string s2 )
 
  100     return r1 == r2 ?  e1 < e2
 
  106   std::vector<std::string> getsortedfiles( std::string 
dir )
 
  109       throw art::Exception( art::errors::Configuration )
 
  110         << 
"Vacuous directory name" << std::endl;
 
  112     std::vector<std::string> files;
 
  115     if( (dp = opendir(dir.c_str())) == NULL ) {
 
  116       throw art::Exception( art::errors::FileOpenError )
 
  117         << 
"Error opening directory " << dir << std::endl;
 
  120     dirent * dirp = NULL;
 
  121     while( (dirp = readdir(dp)) != NULL ) {
 
  122       std::string 
filename( dirp->d_name );
 
  123       if( 
filename.find(
"bin") != std::string::npos ) {
 
  129     sort( files.begin(), files.end(), compare );
 
  134   struct EventFileSentry {
 
  136     explicit EventFileSentry(std::string 
const &filepath)
 
  137       : infile(filepath.c_str(), 
std::ios_base::
in | 
std::ios_base::binary)
 
  139     ~EventFileSentry() { infile.close(); }
 
  141     std::ifstream infile;
 
  145   void process_LAr_file(std::string dir,
 
  147                         std::vector<raw::RawDigit>& digitList,
 
  154     EventFileSentry efs(dir+
"/"+filename);
 
  155     std::ifstream &infile = efs.infile;
 
  157     if( !infile.is_open() ) {
 
  158       throw art::Exception( art::errors::FileReadError )
 
  159         << 
"failed to open input file " << filename << std::endl;
 
  162     unsigned int wiresPerPlane = 240;
 
  170     infile.read((
char *) &h1, 
sizeof h1);
 
  172     time_t mytime = h1.time;
 
  173     mytime = mytime << 32;
 
  198     digitList.resize(wiresPerPlane*planes);
 
  200     for( 
int i = 0; i != h1.nchan; ++i ) {
 
  201       infile.read((
char *) &c1, 
sizeof c1);
 
  203       std::vector<short> adclist(c1.samples);
 
  204       infile.read((
char*)&adclist[0],
sizeof(
short)*c1.samples);
 
  209       digitList[i] = 
raw::RawDigit((c1.ch-1), c1.samples, adclist);
 
  212       digitList[i].SetPedestal(400.); 
 
  215     infile.read((
char *) &f1, 
sizeof f1);
 
  226                                        art::ProductRegistryHelper &helper,
 
  227                                        art::SourceHelper 
const &pm)
 
  232     , nextfile_          ( inputfiles_.
begin() )
 
  233     , filesdone_         ( inputfiles_.
end() )
 
  234     , currentSubRunID_   ( )
 
  237     helper.reconstitutes<std::vector<raw::RawDigit>,  art::InEvent>(
"daq");
 
  257     fb = 
new art::FileBlock(art::FileFormatVersion(1, 
"LArRawInput 2011a"),
 
  262                                    art::SubRunPrincipal* 
const & ,
 
  263                                    art::RunPrincipal* &outR,
 
  264                                    art::SubRunPrincipal* &outSR,
 
  265                                    art::EventPrincipal* &outE)
 
  270     std::unique_ptr<std::vector<raw::RawDigit> >  rdcol ( 
new std::vector<raw::RawDigit>  );
 
  276     std::unique_ptr<raw::DAQHeader>              daqcol( 
new raw::DAQHeader(daqHeader) );
 
  278     art::RunNumber_t rn = daqHeader.
GetRun();
 
  281     if (firstEventInRun){
 
  282       std::unique_ptr<sumdata::RunData> rundata(
new sumdata::RunData(
"argoneut") );
 
  288       art::put_product_in_principal(std::move(rundata), *outR, 
"daq");
 
  291       throw cet::exception(
"InconsistentEventStream")
 
  292         << 
"Encountered run #" << rn
 
  303     art::put_product_in_principal(std::move(rdcol),
 
  306     art::put_product_in_principal(std::move(daqcol),
 
double std(const std::vector< short > &wf, const double ped_mean, size_t start, size_t nsample)
Collection of charge vs time digitized from a single readout channel. 
static std::string format(PyObject *obj, unsigned int pos, unsigned int indent, unsigned int maxlen, unsigned int depth)
then echo fcl sbnd_project sbnd_project sbnd_project sbnd_project production production checksum
BEGIN_PROLOG could also be dds filename
Definition of basic raw digits. 
auto end(FixedBins< T, C > const &) noexcept
auto begin(FixedBins< T, C > const &) noexcept
if &&[-z"$BASH_VERSION"] then echo Attempting to switch to bash bash shellSwitch exit fi &&["$1"= 'shellSwitch'] shift declare a IncludeDirectives for Dir in
then echo fcl sbnd_project sbnd_project sbnd_project sbnd_project software
physics associatedGroupsWithLeft p1