45 unsigned short software;
57 unsigned short samples;
70 size_t p1 = s1.find(
"R");
71 size_t p2 = s1.find(
"_E");
73 int run = atoi((s1.substr(p1+1,p2-p1-1)).c_str());
81 size_t p1 = s1.find(
"E");
82 size_t p2 = s1.find(
"_T");
84 int event = atoi((s1.substr(p1+1,p2-p1-1)).c_str());
97 return r1 == r2 ? e1 < e2
107 <<
"Vacuous directory name" <<
std::endl;
109 std::vector<std::string>
files;
112 if( (dp = opendir(dir.c_str())) == NULL ) {
114 <<
"Error opening directory " << dir <<
std::endl;
117 dirent * dirp = NULL;
118 while( (dirp = readdir(dp)) != NULL ) {
120 if(
filename.find(
"bin") != std::string::npos ) {
126 sort( files.begin(), files.end(),
compare );
131 struct EventFileSentry {
134 :
infile(filepath.c_str(),
std::ios_base::in |
std::ios_base::binary)
136 ~EventFileSentry() {
infile.close(); }
144 std::vector<raw::RawDigit>& digitList,
151 EventFileSentry efs(dir+
"/"+filename);
152 std::ifstream &
infile = efs.infile;
154 if( !infile.is_open() ) {
156 <<
"failed to open input file " << filename <<
std::endl;
159 unsigned int wiresPerPlane = 48;
160 unsigned int planes = 3;
167 infile.read((
char *) &h1,
sizeof h1);
169 time_t mytime = h1.time;
170 mytime = mytime << 32;
195 digitList.resize(wiresPerPlane*planes);
197 for(
int i = 0; i != h1.nchan; ++i ) {
198 infile.read((
char *) &c1,
sizeof c1);
200 std::vector<short> adclist(c1.samples);
201 infile.read((
char*)&adclist[0],
sizeof(
short)*c1.samples);
207 if (h1.run<280 && h1.run>192) {
218 digitList[i].SetPedestal(400.);
221 infile.read((
char *) &f1,
sizeof f1);
238 , nextfile_ ( inputfiles_.
begin() )
239 , filesdone_ ( inputfiles_.
end() )
240 , currentSubRunID_ ( )
276 std::unique_ptr<std::vector<raw::RawDigit> > rdcolsb (
new std::vector<raw::RawDigit> );
282 std::unique_ptr<raw::DAQHeader> daqcolsb(
new raw::DAQHeader(daqHeader) );
299 <<
"Encountered run #" << rn
end
while True: pbar.update(maxval-len(onlies[E][S])) #print iS, "/", len(onlies[E][S]) found = False for...
Collection of charge vs time digitized from a single readout channel.
int compare(unsigned *r, sha1::digest_t const &d)
static bool format(QChar::Decomposition tag, QString &str, int index, int len)
SubRunPrincipal * makeSubRunPrincipal(SubRunAuxiliary const &subRunAux) const
RunPrincipal * makeRunPrincipal(RunAuxiliary const &runAux) const
TypeLabel const & reconstitutes(std::string const &modLabel, std::string const &instanceName={})
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
std::enable_if_t<!detail::range_sets_supported(P::branch_type)> put_product_in_principal(std::unique_ptr< T > &&product, P &principal, std::string const &module_label, std::string const &instance_name={})
Conversion of binary data to root files.
EventPrincipal * makeEventPrincipal(EventAuxiliary const &eventAux, std::unique_ptr< History > &&history) const
decltype(auto) constexpr begin(T &&obj)
ADL-aware version of std::begin.
SubRunNumber_t subRun() const
cet::coded_exception< error, detail::translate > exception
QTextStream & endl(QTextStream &s)
IDNumber_t< Level::Run > RunNumber_t