To build XRootD with with XrdEc:

    following build dependencies are required: autoconf, automake, libtool, yasm
    following flag needs to be passed to cmake: -DENABLE_XRDEC=TRUE

The OFS plug-in needs to send following redirect response in order to activate the default EC plug-in in the xrootd client:

   if( error.getUCap() & XrdOucEI::uEcRedir )
   {
     const char *redirec = "root://ec-gateway.cern.ch//tmp/file.out?"
                           "xrdec.nbdta=4&"
                           "xrdec.nbprt=2&"
                           "xrdec.blksz=1024&"
                           "xrdec.plgr=file:///data/dir00/,file:///data/dir01/,file:///data/dir02/,file:///data/dir03/,file:///data/dir04/,file:///data/dir05/,file:///data/dir06/,file:///data/dir07/&"
                           "xrdec.objid=00000001&"
                           "xrdec.format=1&"
                           "xrdec.dtacgi=sign=123ABC,sign=123ABC,sign=123ABC,sign=123ABC,sign=123ABC,sign=123ABC,sign=123ABC,sign=123ABC&"
                           "xrdec.mdtacgi=sign=123ABC,sign=123ABC,sign=123ABC,sign=123ABC,sign=123ABC,sign=123ABC,sign=123ABC,sign=123ABC&"
                           "xrdec.cosc=true&"
                           "xrdec.cksum=crc32c&""
                           "xrdec.chdigest=crc32c"& // optional
                           "xrdec.nomtfile=false";  // optional
     error.setErrInfo(~( kXR_ecRedir ), redirec);
     return SFS_REDIRECT;
   }

If xrdec.cosc=true, the client will send an opaque query to commit the file on successful close:

   ?xrdec.objid=00000001&xrdec.close=true&xrdec.size=4096&xrdec.cksum=adler32:cbec9df1


Alternatively, the default EC plagin can be loaded using a client side plug-in config file (e.g. /etc/xrootd/client.plugins.d/xrdec.conf):

  url = root://*
  lib = XrdEcDefault
  enable = true
  nbdta = 4
  nbprt = 2
  chsz = 1048576

In this case the default EC plug-in will obtain a placement group for a file using locate request (and no additional metadata files will be created).
