Changeset 13535


Ignore:
Timestamp:
05/03/12 10:39:01 (13 years ago)
Author:
neise
Message:
Makefile works
Location:
fact/tools/rootmacros
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • fact/tools/rootmacros/DrsCalibration.C

    r13534 r13535  
    22
    33#include <iostream>
     4using namespace std;
     5
    46float getValue( int slice, int pixel,
    57        vector<float> &drs_basemean,
    68        vector<float> &drs_gainmean,
    79        vector<float> &drs_triggeroffsetmean,
    8         UInt_t RegionOfInterest,
     10        unsigned int    RegionOfInterest,
    911        vector<int16_t> AllPixelDataVector,
    1012        vector<int16_t> StartCellVector
     
    5658        vector<float> &drs_gainmean,
    5759        vector<float> &drs_triggeroffsetmean,
    58         UInt_t RegionOfInterest,
     60        unsigned int RegionOfInterest,
    5961        vector<int16_t> AllPixelDataVector,
    6062        vector<int16_t> StartCellVector,
  • fact/tools/rootmacros/DrsCalibration.h

    r13534 r13535  
    66
    77float getValue( int slice, int pixel,
    8         vector<float> &drs_basemean,
    9         vector<float> &drs_gainmean,
    10         vector<float> &drs_triggeroffsetmean,
    11         UInt_t RegionOfInterest,
    12         vector<int16_t> AllPixelDataVector,
    13         vector<int16_t> StartCellVector
     8    std::vector<float> &drs_basemean,
     9    std::vector<float> &drs_gainmean,
     10    std::vector<float> &drs_triggeroffsetmean,
     11    unsigned int RegionOfInterest,
     12    std::vector<int16_t> AllPixelDataVector,
     13    std::vector<int16_t> StartCellVector
    1414);
    1515
    16 size_t applyDrsCalibration( vector<float> &destination,
    17         int pixel,
    18   int LeaveOutLeft,
    19   int LeaveOutRight,
    20         vector<float> &drs_basemean,
    21         vector<float> &drs_gainmean,
    22         vector<float> &drs_triggeroffsetmean,
    23         UInt_t RegionOfInterest,
    24         vector<int16_t> AllPixelDataVector,
    25         vector<int16_t> StartCellVector,
    26         int verbosityLevel  = 1
     16size_t applyDrsCalibration(
     17    std::vector<float> &destination,
     18    int pixel,
     19    int LeaveOutLeft,
     20    int LeaveOutRight,
     21    std::vector<float> &drs_basemean,
     22    std::vector<float> &drs_gainmean,
     23    std::vector<float> &drs_triggeroffsetmean,
     24    unsigned int RegionOfInterest,
     25    std::vector<int16_t> AllPixelDataVector,
     26    std::vector<int16_t> StartCellVector,
     27    int verbosityLevel  = 1
    2728);
    2829
  • fact/tools/rootmacros/PulseTemplates/Makefile

    r13522 r13535  
    1 all:
    2         g++ -o pulseoverlay FPulseOverlay.C -I`root-config --incdir` `root-config --glibs`
     1CXXFLAGS = -I`root-config --incdir` `root-config --glibs` -Wall -g
     2CC = g++
     3RM = rm
     4
     5OBJ = openFits.o discriminator.o zerosearch.o factfir.o \
     6    DrsCalibration.o SpikeRemoval.o rootfilehandler.o pixel.o
     7
     8BINNAME = pulseoverlay
     9
     10$(BINNAME): $(OBJ)
     11        $(CC) $(CXXFLAGS) FPulseOverlay.C $(OBJ) -o $@
     12
     13openFits.o : ../openFits.c ../openFits.h ../fits.h ../izstream.h
     14        $(CC) $(CXXFLAGS) -c $< -o $@
     15
     16discriminator.o : ../discriminator.C ../discriminator.h
     17        $(CC) $(CXXFLAGS) -c $< -o $@
     18
     19zerosearch.o : ../zerosearch.C ../zerosearch.h
     20        $(CC) $(CXXFLAGS) -c $< -o $@
     21
     22factfir.o : ../factfir.C ../factfir.h
     23        $(CC) $(CXXFLAGS) -c $< -o $@
     24
     25DrsCalibration.o : ../DrsCalibration.C ../DrsCalibration.h
     26        $(CC) $(CXXFLAGS) -c $< -o $@
     27
     28SpikeRemoval.o : ../SpikeRemoval.C ../SpikeRemoval.h
     29        $(CC) $(CXXFLAGS) -c $< -o $@
     30
     31rootfilehandler.o : rootfilehandler.C rootfilehandler.h
     32        $(CC) $(CXXFLAGS) -c $< -o $@
     33
     34pixel.o : pixel.C pixel.h
     35        $(CC) $(CXXFLAGS) -c $< -o $@
     36
     37all: $(BINNAME)
     38
    339clean:
    4         rm main
     40        $(RM) *.o
  • fact/tools/rootmacros/PulseTemplates/rootfilehandler.C

    r13534 r13535  
    33
    44#include "rootfilehandler.h"
    5 
     5#include <stdlib.h>
    66using namespace std;
    77
  • fact/tools/rootmacros/SpikeRemoval.C

    r13534 r13535  
    22
    33#include <iostream>
     4using namespace std;
    45
    56// compute the mean of the left and right neighbors of a channel
  • fact/tools/rootmacros/SpikeRemoval.h

    r13534 r13535  
    44#include <vector>
    55
    6 vector<float> * computeN1mean( vector<float> &src);
     6std::vector<float> * computeN1mean( std::vector<float> &src);
    77
    88void removeSpikes(
    9         vector<float> &src,
    10         vector<float> &dest,
     9        std::vector<float> &src,
     10        std::vector<float> &dest,
    1111        const float CandidateTHR = -5.0,
    1212        const float nextDiffTHR = -1.6,
  • fact/tools/rootmacros/factfir.C

    r13534 r13535  
    1 #include <vector>
     1
    22#include <deque>
    33#include "factfir.h"
     4
     5using namespace std;
     6
    47// source vector is
    58void factfir(double b, vector<double> &a, int k, vector<float> &source, vector<float> &dest){
  • fact/tools/rootmacros/factfir.h

    r13534 r13535  
    22#define __FACTFIR_H
    33
     4#include <vector>
     5
     6
    47void factfir(
    58    double b,
    6     vector<double> &a,
     9    std::vector<double> &a,
    710    int k,
    8     vector<float> &source,
    9     vector<float> &dest);
     11    std::vector<float> &source,
     12    std::vector<float> &dest);
    1013
    1114void sliding_avg(
    12     vector<float> &source,
    13     vector<float> &dest,
     15    std::vector<float> &source,
     16    std::vector<float> &dest,
    1417    unsigned int HalfWidth);
    1518#endif // __FACTFIR_H
  • fact/tools/rootmacros/izstream.h

    r12255 r13535  
    1515#else
    1616#include <zlib.h>
     17#include "string.h"
     18#include <stdio.h>
    1719#endif
    1820
  • fact/tools/rootmacros/openFits.c

    r13534 r13535  
    33#include "stdint.h"
    44
    5 
     5using namespace std;
    66
    77// Opens FACT Fits Raw Data  -- for more Info refer to header file
     
    1212        vector<int16_t> &StartCells,    // vector, which will be filled with DRS start positions
    1313        unsigned int &EventID,                  // index of the current event
    14         UInt_t &RegionOfInterest,               // Width of the Region, read out of the DRS
    15         UInt_t &NumberOfPixels,                 // Total number of pixel, read out of the camera
     14        unsigned int &RegionOfInterest,         // Width of the Region, read out of the DRS
     15        unsigned int &NumberOfPixels,                   // Total number of pixel, read out of the camera
    1616        size_t &PXLxROI,                                // Size of column "Data" = #Pixel x ROI
    1717                        // this can be used, to x-check RegionOfInterest and NumberOfPixels
  • fact/tools/rootmacros/openFits.h

    r13534 r13535  
    66#include <cstdio>
    77#include "stdint.h"
     8#include <vector>
    89
    910size_t openDataFits(
    1011        const char *datafilename,               // path to fits file containing FACT raw data
    11         fits * * datafile,                              // ptr to pointer, where to return the fits object
    12         vector<int16_t> &Data,                  // vector, which will be filled with raw data
    13         vector<int16_t> &StartCells,    // vector, which will be filled with DRS start positions
     12        std::fits * * datafile,                         // ptr to pointer, where to return the fits object
     13        std::vector<int16_t> &Data,                     // vector, which will be filled with raw data
     14        std::vector<int16_t> &StartCells,       // vector, which will be filled with DRS start positions
    1415        unsigned int &EventID,                  // index of the current event
    15         UInt_t &RegionOfInterest,               // Width of the Region, read out of the DRS
    16         UInt_t &NumberOfPixels,                 // Total number of pixel, read out of the camera
     16        unsigned int &RegionOfInterest,         // Width of the Region, read out of the DRS
     17        unsigned int &NumberOfPixels,                   // Total number of pixel, read out of the camera
    1718        size_t &PXLxROI,                                // Size of column "Data" = #Pixel x ROI
    1819                        // this can be used, to x-check RegionOfInterest and NumberOfPixels
     
    2223size_t openCalibFits(
    2324  const char *FileName,     // path to fits file
    24   vector<float> &Offset,
    25   vector<float> &Gain,
    26   vector<float> &TriggerOffset,
     25  std::vector<float> &Offset,
     26  std::vector<float> &Gain,
     27  std::vector<float> &TriggerOffset,
    2728  size_t &TriggerOffsetROI,
    2829  int VerbosityLevel =0
  • fact/tools/rootmacros/zerosearch.C

    r13534 r13535  
    11#include "Region.h"
    22#include <iostream>
    3 #include <vector>
    43
    54#include "zerosearch.h"
     5
     6using namespace std;
    67
    78// searches for zero crossings in a given vector of floats
  • fact/tools/rootmacros/zerosearch.h

    r13424 r13535  
    44
    55#include "Region.h"
     6#include <vector>
    67
    7 vector<Region> *zerosearch(
    8     vector<float> &input,
     8std::vector<Region> *zerosearch(
     9    std::vector<float> &input,
    910    int edge = 1,                       // search for transitions on rising edge=1, -1:falling
    1011    unsigned int step = 4,                      // search in steps of step
     
    1213);
    1314
    14 size_t ShiftRegionBy(vector<Region> &src,
     15size_t ShiftRegionBy(
     16    std::vector<Region> &src,
    1517    int Shift,
    1618    int VerbosityLevel=0);
    1719
    18 size_t EnlargeRegion(vector<Region> &src,
     20size_t EnlargeRegion(std::vector<Region> &src,
    1921    int Left,
    2022    int Right,
     
    2224
    2325size_t findAbsMaxInRegions(
    24     vector<Region> &regions,
    25     vector<float> &data,
     26    std::vector<Region> &regions,
     27    std::vector<float> &data,
    2628    int VerbosityLevel=0);
    2729
     
    2931
    3032size_t removeEqualMaxima(
    31     vector<Region> &regions,
     33    std::vector<Region> &regions,
    3234    int VerbosityLevel=0);
    3335
    3436size_t removeRegionOnFallingEdge(
    35   vector<Region> &regions,
     37  std::vector<Region> &regions,
    3638  unsigned int FallingEdgeWidth = 100,
    3739  int VerbosityLevel=0);
     
    3941
    4042size_t removeRegionWithMaxOnEdge(
    41     vector<Region> &regions,
     43    std::vector<Region> &regions,
    4244    unsigned int EdgeWidth=3,
    4345    int VerbosityLevel=0);
    4446
    4547size_t removeMaximaBelow(
    46     vector<Region> &regions,
     48    std::vector<Region> &regions,
    4749    float threshold = 2.0,
    4850    int VerbosityLevel=0);
    4951
    5052size_t removeMaximaAbove(
    51     vector<Region> &regions,
     53    std::vector<Region> &regions,
    5254    float threshold= 14.0,
    5355    int VerbosityLevel=0);
    5456
    5557Region FindAbsMax(
    56    vector<Region> &regions,
     58   std::vector<Region> &regions,
    5759   int VerbosityLevel=0);
    5860
    5961size_t findTimeOfHalfMaxLeft(
    60     vector<Region> &regions,
    61     vector<float> &data,
     62    std::vector<Region> &regions,
     63    std::vector<float> &data,
    6264    float baseline = -0.5,
    6365    int beginRisingEdge = 5,
Note: See TracChangeset for help on using the changeset viewer.