CMS 3D CMS Logo

Macros | Functions | Variables
adler32.cc File Reference
#include <cstdio>
#include <cstdlib>
#include <fcntl.h>
#include <fmt/format.h>
#include <iostream>
#include <libgen.h>
#include <sys/stat.h>
#include <unistd.h>
#include <zlib.h>

Go to the source code of this file.

Macros

#define _LARGEFILE64_SOURCE
 

Functions

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

Variables

constexpr int EDMFILEUTILADLERBUFSIZE = 10 * 1024 * 1024
 

Macro Definition Documentation

◆ _LARGEFILE64_SOURCE

#define _LARGEFILE64_SOURCE

Definition at line 14 of file adler32.cc.

Function Documentation

◆ main()

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

===============================================================================================================================================================================================


variant2: for each run define phi-averaged A for normalization channel (Dref,16) and then, divide Rijk on it, i.e. get RRijk




















































































eta=27

eta=25

eta=23

eta=22

eta=21

eta=26

eta=24

eta=19

eta=17

eta=25

eta=23

eta=22

eta=21

eta=26

eta=24

eta=20

eta=19

eta=18

eta=27 L1=1

eta=25 L1=1

eta=23 L1=1

eta=22 L1=1

eta=21 L1=1

eta=29 L1=1

eta=26 L1=1

eta=24 L1=1

eta=20 L1=1

eta=19 L1=1

eta=18 L1=1

eta=17 L1=1

eta=28 L7=1

eta=27 L7=1

eta=25 L7=1

eta=23 L7=1

eta=22 L7=1

eta=21 L7=1

eta=26 L7=1

eta=24 L7=1

eta=20 L7=1

eta=19 L7=1

eta=18 L7=1

eta=17 L7=1

eta=27

eta=25

eta=23

eta=22

eta=21

eta=26

eta=24

eta=19

eta=17

eta=25

eta=23

eta=22

eta=21

eta=26

eta=24

eta=20

eta=19

eta=18

eta=27 L1=1

eta=25 L1=1

eta=23 L1=1

eta=22 L1=1

eta=21 L1=1

eta=26 L1=1

eta=24 L1=1

eta=20 L1=1

eta=19 L1=1

eta=18 L1=1

eta=17 L1=1

eta=28 L7=1

eta=27 L7=1

eta=25 L7=1

eta=23 L7=1

eta=22 L7=1

eta=21 L7=1

eta=26 L7=1

eta=24 L7=1

eta=20 L7=1

eta=19 L7=1

eta=18 L7=1

eta=17 L7=1

eta=27

eta=28

errA with average Amplitudes

errA with average Amplitudes

errA with average Amplitudes

errA with average Amplitudes

Summed Amplitude Plots:







Summed Amplitude Plots:

Summed Amplitude Plots:

Summed Amplitude Plots:

Summed Amplitude Plots:

Summed Amplitude Plots:

Sticking ADC counts in neughbouring TS for HB:

Sticking ADC counts in neughbouring TS for HE:

RBX:

errA with average Amplitudes

errA with average Amplitudes

errA with average Amplitudes

errA with average Amplitudes

Summed Amplitude Plots:





Summed Amplitude Plots:

Summed Amplitude Plots:

Summed Amplitude Plots:

Summed Amplitude Plots:

Summed Amplitude Plots:

RBX:

errA with average Amplitudes

errA with average Amplitudes

errA with average Amplitudes

errA with average Amplitudes

Summed Amplitude Plots:





Summed Amplitude Plots:

Summed Amplitude Plots:

Summed Amplitude Plots:

Summed Amplitude Plots:

Summed Amplitude Plots:

RBX:

Prepare maps of good/bad channels:

Prepare maps of good/bad channels:

Prepare maps of good/bad channels:

Prepare maps of good/bad channels:

Definition at line 31 of file adler32.cc.

References dir2webdir::argc, GCPpyPlots::argv, edmScanValgrind::buffer, gather_cfg::cout, EDMFILEUTILADLERBUFSIZE, beamvalidation::exit(), dqm-mbProfile::format, O_LARGEFILE, and fileinputsource_cfi::read.

31  {
32  if (argc == 1) {
33  std::cout << basename(argv[0]) << ": no files specified.\n";
34  exit(1);
35  }
36 
37  std::unique_ptr<unsigned char[]> buffer{new unsigned char[EDMFILEUTILADLERBUFSIZE]};
38  int fileNum = 0;
39  for (fileNum = 1; fileNum < argc; fileNum++) {
40  uLong adlerCksum = adler32(0, nullptr, 0);
41  off64_t fileSize = 0;
42 
43  int myFD = open(argv[fileNum], O_RDONLY | O_LARGEFILE);
44  if (myFD == -1) {
45  std::cout << basename(argv[0]) << ": failed to open file " << argv[fileNum] << ".\n";
46  continue;
47  }
48 
49  lseek(myFD, 0, SEEK_SET);
50 
51  int readSize = 0;
52  while ((readSize = read(myFD, buffer.get(), EDMFILEUTILADLERBUFSIZE)) > 0) {
53  adlerCksum = adler32(adlerCksum, buffer.get(), readSize);
54  fileSize += readSize;
55  }
56 
57  std::cout << fmt::format("{:x} {} {}\n", adlerCksum, fileSize, argv[fileNum]);
58  }
59 
60  return (0);
61 }
#define O_LARGEFILE
constexpr int EDMFILEUTILADLERBUFSIZE
Definition: adler32.cc:29
def exit(msg="")

Variable Documentation

◆ EDMFILEUTILADLERBUFSIZE

constexpr int EDMFILEUTILADLERBUFSIZE = 10 * 1024 * 1024

Definition at line 29 of file adler32.cc.

Referenced by main().