add changes
authorSamir Amar-Youcef <samir@ikf>
Fri, 20 Mar 2015 15:58:37 +0000 (16:58 +0100)
committerSamir Amar-Youcef <samir@ikf>
Fri, 20 Mar 2015 15:58:37 +0000 (16:58 +0100)
s-curves/cpp_sam/header.h [new file with mode: 0755]
s-curves/cpp_sam/help.h [new file with mode: 0755]

diff --git a/s-curves/cpp_sam/header.h b/s-curves/cpp_sam/header.h
new file mode 100755 (executable)
index 0000000..3a13e83
--- /dev/null
@@ -0,0 +1,51 @@
+#include <stdlib.h>
+#include <TClass.h>
+#include <fstream>
+#include <iostream>
+#include "Riostream.h"
+#include <string>
+#include "TString.h"
+#include "TMath.h"
+#include <TFile.h>
+#include <TNtuple.h>
+#include <TH1F.h>
+#include <TH2F.h>
+#include "TH1.h"
+#include "TF1.h"
+#include "TROOT.h"
+#include <TApplication.h>
+#include "TCanvas.h"
+#include "TObject.h"
+#include "TStyle.h"
+#include "TEnv.h"
+#include "TGraph.h"
+#include "TGaxis.h"
+#include "TStyle.h"
+#include "TFrame.h"
+#include "TVector.h"
+#include "TVectorD.h"
+#include "Foption.h"
+#include "TRandom.h"
+#include "TRandom3.h"
+#include "TSpline.h"
+#include "TPaveStats.h"
+#include "TVirtualFitter.h"
+#include "TVirtualPad.h"
+//#include "TVirtualGraphPainter.h"
+#include "TBrowser.h"
+#include "TSystem.h"
+#include "TPluginManager.h"
+#include "TPad.h"
+#include <TQObject.h>
+#include <TMultiGraph.h>
+#include <vector>
+#include "TControlBar.h"
+#include <string>
+#include <stdio.h>
+#include <stdlib.h>
+#include "TGraphErrors.h"
+#include "TMinuit.h"
+#include <iomanip>
+#include <sys/time.h>
+#include <TLegend.h>
+using namespace std;
\ No newline at end of file
diff --git a/s-curves/cpp_sam/help.h b/s-curves/cpp_sam/help.h
new file mode 100755 (executable)
index 0000000..ba033e1
--- /dev/null
@@ -0,0 +1,133 @@
+#ifndef HELP_H
+#define HELP_H
+
+#ifndef MAXSTATES
+#define MAXSTATES 1140
+#endif
+
+#include <iostream>
+#include <cstdlib>
+#include <unistd.h>
+#include <stdlib.h>
+#include <stddef.h>
+#include <stdio.h>
+#include <unistd.h>
+#include "TStopwatch.h"
+
+//####################################################################
+
+// Int_t print_progress(Float_t ProgressInPercent) {
+//     
+//     Int_t nCharacter = printf("\r [");
+//     Int_t iBlock;
+//     
+//     for( iBlock=0; iBlock<ProgressInPercent/2; ++iBlock )
+//     {
+//             putchar( '=' );
+//             nCharacter++;
+//     }
+//     
+//     for( ; iBlock<100/2; ++iBlock )
+//     {
+//             putchar( ' ' );
+//             nCharacter++;
+//     }
+//     
+// //  Int_t sec       = TimeInSec%60;
+// //  Int_t min       = TimeInSec/60;
+// //  Int_t hours     = TimeInSec/3600;
+//     
+//     nCharacter += printf( "] %4.0f%%", ProgressInPercent);
+//     fflush( stdout );
+//     
+//     if((Int_t)ProgressInPercent==100) 
+//     {
+//             printf("\r");
+//             for(Int_t i=0; i<nCharacter; i++)
+//             {
+//                     putchar( ' ' );
+//             }
+//             printf("\r ... done! \n");
+//     }
+//     
+//     return nCharacter;
+// }
+
+//####################################################################
+
+// Int_t print_progress(Float_t ProgressInPercent, Int_t TimeInSec) {
+//     
+//     Int_t nCharacter = printf("\r [");
+//     Int_t iBlock;
+//     
+//     for( iBlock=0; iBlock<ProgressInPercent/2; ++iBlock )
+//     {
+//             putchar( '=' );
+//             nCharacter++;
+//     }
+//     
+//     for( ; iBlock<100/2; ++iBlock )
+//     {
+//             putchar( ' ' );
+//             nCharacter++;
+//     }
+//     
+//     Int_t sec       = TimeInSec%60;
+//     Int_t min       = TimeInSec/60;
+//     Int_t hours     = TimeInSec/3600;
+//     
+//     nCharacter += printf( "] %6.2f%% \t %3i:%02i:%02i   ", ProgressInPercent, hours, min, sec );
+//     fflush( stdout );
+//     
+//     if(ProgressInPercent==100) 
+//     {
+//             printf("\r");
+//             for(Int_t i=0; i<nCharacter; i++)
+//             {
+//                     putchar( ' ' );
+//             }
+//             printf("\r ...done! \t ( %i:%02i:%02i ) \n", hours, min, sec );
+//     }
+//     
+//     return nCharacter;
+// }
+
+//####################################################################
+
+struct frameInfo{
+// to be processed
+       UInt_t  posInEvent;
+       
+// to be stored
+       UInt_t  event;
+       UInt_t  framenr;
+       UInt_t  sensorid;
+       UInt_t  status;
+       UInt_t  datalengthcount;
+       UInt_t  datalength;
+       ULong_t timestamp;
+       ULong_t debug;
+       
+       UInt_t  states;
+       UInt_t  row                                     [MAXSTATES];
+       UInt_t  column                          [MAXSTATES];
+       UInt_t  nextn                           [MAXSTATES];
+       UInt_t  overflow                        [MAXSTATES];
+       
+       UInt_t  clusters;
+       UInt_t  pixelsPerCluster        [MAXSTATES];
+       UInt_t  statesPerCluster        [MAXSTATES];
+       Float_t row_cg                          [MAXSTATES];
+       Float_t column_cg                       [MAXSTATES];
+       Int_t cerror;
+       Int_t rerror;
+       Int_t colerror;
+       UInt_t  shapecode                       [MAXSTATES];
+       UInt_t  xmin                            [MAXSTATES];
+       UInt_t  ymin                            [MAXSTATES];
+       UInt_t  dx                                      [MAXSTATES];
+       UInt_t  dy                                      [MAXSTATES];
+};
+
+//####################################################################
+#endif
\ No newline at end of file