#include <FileChopper.h>
Public Member Functions | |
| FileChopper () | |
| FileChopper (const char *fname, Int_t sizeofchop=400) | |
| ~FileChopper () | |
| Int_t | GetTotalPieces () |
| Int_t | GetSizeOfPiece (Int_t ii) |
Private Attributes | |
| TChain * | chain |
| Int_t | tot_entries |
| Int_t | chop_size |
| Int_t | pieces |
| Int_t | remainder |
|
|
Definition at line 17 of file FileChopper.cxx. References chain, chop_size, pieces, remainder, and tot_entries. 00017 {
00018
00019 tot_entries=0;
00020 chop_size=0;
00021 pieces=0;
00022 remainder=0;
00023
00024 cout << "Caution! Emtpy constructor for FileChopper does not chop ANYTHING" << endl;
00025
00026 chain = new TChain("NtpSt");
00027
00028 }
|
|
||||||||||||
|
Definition at line 30 of file FileChopper.cxx. References chain, chop_size, pieces, remainder, and tot_entries. 00030 {
00031
00032 chop_size=sizeofchop;
00033
00034 chain = new TChain("NtpSt");
00035
00036 Int_t filenum = chain->Add(fname);
00037 tot_entries = chain->GetEntries();
00038 remainder=tot_entries % chop_size;
00039 pieces= tot_entries/chop_size + (bool)remainder;
00040
00041 cout << "======== FileChopper =================" << endl;
00042 cout << "Added " << filenum << " file(s) to the FileChopper" << endl;
00043 cout << "The file(s) has " << tot_entries << " entries in total" << endl;
00044 cout << "Will divide in " << pieces << " pieces" << endl;
00045
00046 }
|
|
|
Definition at line 48 of file FileChopper.cxx. 00048 {
00049
00050 delete chain;
00051
00052 }
|
|
|
Definition at line 61 of file FileChopper.cxx. References pieces, and remainder. 00061 {
00062
00063 Int_t valuetoret=0;
00064
00065 if(ii<pieces-1){
00066 valuetoret=chop_size;
00067 } else if(ii==pieces-1){
00068 if(remainder==0){
00069 valuetoret=chop_size;
00070 } else{
00071 valuetoret=remainder;
00072 }
00073 }
00074
00075 return valuetoret;
00076
00077 }
|
|
|
Definition at line 55 of file FileChopper.cxx. 00055 {
00056
00057 return pieces;
00058
00059 }
|
|
|
Definition at line 29 of file FileChopper.h. Referenced by FileChopper(). |
|
|
Definition at line 31 of file FileChopper.h. Referenced by FileChopper(). |
|
|
Definition at line 32 of file FileChopper.h. Referenced by FileChopper(), and GetSizeOfPiece(). |
|
|
Definition at line 33 of file FileChopper.h. Referenced by FileChopper(), and GetSizeOfPiece(). |
|
|
Definition at line 30 of file FileChopper.h. Referenced by FileChopper(). |
1.3.9.1