Changeset 292 in Idarraga


Ignore:
Timestamp:
Apr 30, 2012, 3:33:30 AM (12 years ago)
Author:
idarraga
Message:
 
Location:
mpxdataconverter
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • mpxdataconverter/MediPixROOTConverter.cpp

    r277 r292  
    7777*/
    7878
    79   if((listOfFiles.size() != listOfDSCFiles.size()) && listOfDSCFiles.size() != 0)
    80     {
     79  if( listOfFiles.size() != listOfDSCFiles.size() ) {
    8180      std::cout << "[ERROR] you have a different amount of dsc and frame files." << std::endl;
    8281      std::cout << "        You probably have an extra file that doesn't correspond" << std::endl;
     
    8483      exit(1);
    8584    }
    86 
    8785
    8886  Long_t filesItr;
  • mpxdataconverter/allpix_dm.cc

    r283 r292  
    638638                }
    639639        }
    640         else if (frameType == FSAVE_BINARY) {
     640        //////////////////////////////////////////////////////////////////////////
     641        // Binaries
     642        //////////////////////////////////////////////////////////////////////////
     643        else if (
     644                        ( frameType == (FSAVE_BINARY | FSAVE_I16 | FSAVE_SPARSEXY) ) ||
     645                        ( frameType == (FSAVE_BINARY | FSAVE_U32 | FSAVE_SPARSEXY) )
     646                        )
     647        /*
     648        {
     649
     650                typeS = TYPE_XYC_BIN_STRING;
     651                std::cout << "[INFO] opening: " << fullFileName << "  --|and|-->  " << fullDSCFileName
     652                                << " --> " << typeS << "(" << frameType << ")"<< std::endl;
     653
     654        } else if (frameType == FSAVE_BINARY)
     655        */
     656        { // explicit with B0000001 string
    641657
    642658                typeS = TYPE_XYC_BIN_STRING;
  • mpxdataconverter/listHandler.cpp

    r277 r292  
    3232                // second possible name
    3333                tempName2 = ((TString)(*itFrames));
     34                int size = tempName2.Sizeof();
     35                bool marktobreak = false;
     36                for(int i = size-1 ; i >= 0 ; i--) {
     37                        if(tempName2[i] == '.'){
     38                                marktobreak = true;
     39                        }
     40                        // remove first
     41                        tempName2.Remove(i);
     42                        // then break if necessary
     43                        if(marktobreak) break;
     44                }
     45                tempName2+=".dsc";
     46
     47                /*
    3448                if(((TString)(*itFrames)).Contains(".txt")) {
    3549                        tempName2.Remove(TString::kTrailing, 't');
     
    3953                }
    4054                tempName2+=".dsc";
     55
     56                // third possible name
     57                tempName2 = ((TString)(*itFrames));
     58                if(((TString)(*itFrames)).Contains(".dat")) {
     59                        tempName2.Remove(TString::kTrailing, 't');
     60                        tempName2.Remove(TString::kTrailing, 'x');
     61                        tempName2.Remove(TString::kTrailing, 't');
     62                        tempName2.Remove(TString::kTrailing, '.');
     63                }
     64                tempName2+=".dsc";
     65                 */
    4166
    4267                /* look for the corresponding .dsc file
Note: See TracChangeset for help on using the changeset viewer.